1. Technical Field
The present invention relates to a positioning device for causing a spindle of a machine tool to stop at a desired position.
2. Related Art
With regard to positioning techniques for positioning and stopping a rotating spindle motor, it is desired that positioning be performed quickly and without overshoot. For such techniques, various attempts have heretofore been made.
FIG. 1 shows a block diagram of a typical spindle positioning device. A spindle 15 is driven to rotate by a spindle motor 11 via a transmission mechanism 12 to 14 including a gear and a belt. A speed detector 10 detects a speed of the spindle motor 11, and outputs a speed detection value Vm [min−1]. A subtractor 6 uses the speed detection value Vm as a speed feedback value, and outputs a deviation Vd [min−1] from a speed command Vc [min−1], and, based on the deviation Vd, a speed controller 7 calculates and outputs a torque command Tc [Nm]. Based on the speed detection value Vm, a magnetic flux density command calculator 8 outputs a magnetic flux density command φc. A current controller 9 controls a current of the spindle motor 11 based on the torque command Tc and the magnetic flux density command φc.
When the speed detection value Vm becomes less than or equal to a motor base rotational speed Vb, an acceleration command calculator 32 calculates an acceleration “a” from a speed detection value Vm (T1) which is detected after a certain period of time T1 [s], using the following equation (1), and outputs it to a position command calculator 2 as an acceleration command “as”. During the period of time T1, the speed command Vc is zero (Vc=0), which is equivalent to a state in which the speed is reduced at a maximum torque. As such, Ka in equation (1) is set to a coefficient of 1 or less to provide an acceleration command at which torque saturation does not occur during positioning deceleration.
                    a        =                                            2              ⁢              π                        60                    ×                                    Vb              -                              Vm                ⁡                                  (                                      T                    ⁢                                                                                  ⁢                    1                                    )                                                                    T              ⁢                                                          ⁢              1                                ×          Ka                                    (        1        )            
A comparator 31 outputs, as a spindle motor speed state Sv, HIGH level when the speed detection value Vm is greater than or equal to the spindle motor base rotational speed Vb, and LOW level when the speed detection value Vm is less than the base rotational speed. The acceleration command calculator 32 outputs a control mode switching command Sc at HIGH level so that the control mode is set to speed control during the time when the spindle motor speed state Sv is at HIGH level, or until the calculation of equation (1) is completed. On the other hand, the acceleration command calculator 32 outputs the control mode switching command Sc at LOW level so that the control mode is set to position control when the spindle motor speed state Sv is at LOW level, and after the calculation of equation (1) has been completed. Further, the acceleration command calculator 32 outputs to the position command calculator 2 a control mode switching speed Vs at which the control mode is switched from the speed control to the position control. The control mode switching speed Vs takes any value less than Vb−Vm (T1). A control mode switching switch 5 outputs the speed command Vc output from a host control device 1 when the control mode switching command Sc is at HIGH level, and outputs the speed command Vc output from a position control proportional gain 4 when the control mode switching command Sc is at LOW level. In other words, the spindle positioning device operates in the speed control mode when the motor speed Vm is greater than or equal to the motor base rotational speed Vb, or until the acceleration command calculator 32 completes the calculation of the acceleration command “as”, and switches the control mode after the calculation of the acceleration command “as” has been completed, to operate at the control mode switching speed Vs in the position control mode. Based on the acceleration command “as” (acceleration “a”) and the control mode switching speed Vs, and a position command Pc [rad] for a position located within one rotation of the spindle, which is output from the host control device 1, the position command calculator 2 calculates an integer n which satisfies the following inequality (2), and at which the left side takes its minimum.
                                          2            ⁢            π            ×            n                    +          Pc                ≧                                            (                                                2                  ⁢                  π                  ×                  Vs                                60                            )                        2                    ×                      1                          2              ⁢              a                                                          (        2        )            
Based on the integer n calculated using inequality (2), a position α for causing the spindle to stop at a position located within one rotation of the spindle is calculated using the following equation (3).
                    α        =                              2            ⁢            π            ×            n                    +          Pc          -                                                    (                                                      2                    ⁢                    π                    ×                    Vs                                    60                                )                            2                        ×                          1                              2                ⁢                a                                                                        (        3        )            
Based on the acceleration command “as”, the control mode switching speed Vs, and the position α calculated using equation (3), a position command deviation ΔPc is calculated to provide a speed command as shown in FIG. 2, and is output. A position detector 16 detects the position of the spindle 15, and outputs a position detection value Pd. A subtractor 3 uses the position detection value Pd as a position feedback value, and calculates a deviation from the position command deviation ΔPc. By multiplying the output from the subtractor 3 by the proportional gain, Kp, 4, the speed command Vc is calculated and output. Based on the speed command Vc, the spindle motor is controlled to be positioned and stopped. Because the spindle is decelerated based on the acceleration command “as” calculated using equation (1), and is positioned and stopped, positioning can be performed without torque saturation, without overshoot, and quickly.
As shown in FIG. 2, in order to position and stop the spindle at a predetermined position, stop control is performed in which a period during which the spindle is controlled to achieve a constant speed and a period during which the speed is reduced at a predetermined acceleration “a” are combined. The acceleration “a” is the maximum acceleration that can be achieved by the motor during braking in which the rotational speed is less than or equal to a base rotational speed. In the following description, control performed in a period in which the speed is constant is referred to as “constant speed control”, control performed in a period in which the speed is reduced at the acceleration “a” is referred to as “maximum braking acceleration control”, and control in which the above-described constant speed control and maximum braking acceleration control are sequentially performed to position and stop the spindle is referred to as “stop control”.
The amount of rotation of the spindle from a certain rotational speed (for example, Vs) through deceleration at a certain acceleration until the spindle stops is uniquely determined. Conversely, when the rotational position at which the spindle is caused to stop is determined, the rotational position from which deceleration is started is uniquely determined. When the rotational position of the spindle at a certain point in time is not a position determined from a stop position, the spindle is rotated until the spindle reaches this position while the speed of the spindle is being maintained, and after that, deceleration is performed. By setting the acceleration during deceleration to the maximum possible acceleration, the spindle can be stopped in a short time.
In the related art shown in FIG. 1, it is possible to position and stop a rotating spindle without overshoot, and quickly. However, the acceleration command “as” is calculated only when the rotational speed is less than or equal to the spindle motor base rotational speed, and a certain amount of time is necessary to perform the calculation. As such, because a time T1 to measure an acceleration and a time to calculate the acceleration command “as” are required, the spindle is decelerated during those times, and the spindle speed may become lower than the optimum switching speed for achieving positioning in the shortest time. Therefore, there is a problem in that positioning cannot be performed in the shortest time.